package com.zh.service;

import com.zh.pojo.bo.PayOrderBo;
import com.zh.pojo.domain.PayOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zh.pojo.domain.WxpayFlow;
import com.zh.result.JSONResult;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 初四
 * @since 2024-07-07
 */
public interface IPayOrderService extends IService<PayOrder> {
    /**
     *  保存支付单
     * @param payOrderBo  支付单数据
     */
    void create(PayOrderBo payOrderBo);

    /**
     * 乘客微信支付
     * @param orderNo
     * @return
     */
    JSONResult wechatPay(String orderNo);

    /**
     * 微信小程序回调通知
     * @param request
     */
    void wechatPayNotify(HttpServletRequest request);

    /**
     * 修改支付单状态 ， 保存订单流水
     * @param payOrder  支付单对象
     * @param wxpayFlow 订单流水对象
     */
    void updatePayOrderAndSaveFlow(PayOrder payOrder, WxpayFlow wxpayFlow);
}
